{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "sns.set_style('whitegrid')\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "roc = pd.read_csv('discrete-ROC-step-240000.txt', sep=' ', header=None)\n",
    "roc.columns = ['tpr', 'fp', 'threshold']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def plot_roc():\n",
    "    _, axis = plt.subplots(nrows=1, ncols=1, figsize=(7, 4), dpi=120)\n",
    "    axis.plot(roc.fp, roc.tpr, c='r', linewidth=2.0);\n",
    "    axis.set_title('Discrete Score ROC')\n",
    "    axis.set_xlim([0, 2000.0])\n",
    "    axis.set_ylim([0.6, 1.0])\n",
    "    axis.set_xlabel('False Positives')\n",
    "    axis.set_ylabel('True Positive Rate');\n",
    "\n",
    "plot_roc()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
